home *** CD-ROM | disk | FTP | other *** search
- /* 00010000
- * Name: GOPCLINI EXEC 00020000
- * CMS InterNet Gopher (client) initialization 00030000
- * Author: Rick Troth, Rice University, Information Systems 00040000
- * Date: 1992-Dec-23, 1993-Jan-22 00050000
- */ 00060000
- 00070000
- /* 00080000
- * Copyright 1992 Richard M. Troth. This software was developed 00090000
- * with resources provided by Rice University and is intended 00100000
- * to serve Rice's user community. Rice has benefitted greatly 00110000
- * from the free distribution of software, therefore distribution 00120000
- * of unmodified copies of this material is not restricted. 00130000
- * You may change your own copy as needed. Neither Rice 00140000
- * University nor any of its employees or students shall be held 00150000
- * liable for damages resulting from the use of this software. 00160000
- */ 00170000
- 00180000
- Trace "OFF" 00190000
- 00200000
- Address "COMMAND" 00210000
- 00220000
- Parse Upper Arg . '(' opts ')' . 00230000
- fsin = 1; load = 1 00240000
- Do While opts ^= "" 00250000
- Parse Var opts op opts 00260000
- Select /* op */ 00270000
- When Abbrev("UNLOAD",op,3) Then Signal UNLOAD 00280000
- When Abbrev("NOSCREEN",op,3) Then fsin = 0 00290000
- When Abbrev("NOLOAD",op,3) Then load = 0 00300000
- When Abbrev("SCREEN",op,3) Then fsin = 1 00310000
- When Abbrev("LOAD",op,1) Then load = 1 00320000
- Otherwise 'XMITMSG 3 OP (ERRMSG' 00330000
- End Select /* op */ 00340000
- End /* Do While */ 00350000
- 00360000
- 'SET LANGUAGE (ADD GOP USER' 00370000
- If rc ^= 0 Then Exit rc 00380000
- 00390000
- /* fetch the program ID string */ 00400000
- 'PIPE COMMAND XMITMSG 0 (APPLID GOP CALLER CLI NOHEADER | VAR PROGID' 00410000
- 00420000
- /* migrate old bookmarks */ 00430000
- 'EXEC GOPHMARK' 00440000
- 00450000
- Parse Upper Arg tube . '(' . ')' . 00460000
- 00470000
- 'GLOBALV SELECT GOPHER PUT GOPHER PROGID TUBE' 00480000
- 'GLOBALV SELECT GOPHER SET ITEM' 00490000
- 'GLOBALV SELECT GOPHER SET COMMAND' 00500000
- 00510000
- /* initialize screen variables */ 00520000
- If fsin Then Do 00530000
- If ^Datatype(tube,'X') Then 'VMFCLEAR' /* clear if cons */ 00540000
- Call FSINIT tube /* figure out some screen attribs */ 00550000
- 'PIPE REXXVARS | DROP | JOIN 1 /,/ | LOCATE /n FS./' , 00560000
- '| CHANGE /n /GLOBALV SELECT GOPHER SETL / 1' , 00570000
- '| CHANGE /,v / / 1 | COMMAND' 00580000
- End /* If .. Do */ 00590000
- 00600000
- /* load client gems into memory for efficiency */ 00610000
- If load Then 00620000
- 'PIPE CMS L GOPCLI* REXX * | SPEC /EXECLOAD / 1 1-* NEXT | COMMAND' 00630000
- 00640000
- Exit 00650000
- 00660000
- 00670000
- 00680000
- /* -------------------------------------------------------------- FSINIT00690000
- * Initialize variables used in building screen displays. 00700000
- * (this code comes from Chuck Boeheim's PIPEDEMO; Thanks, Chuck!) 00710000
- */ 00720000
- FSINIT: Procedure Expose fs. 00730000
- Parse Arg t 00740000
- fs.tube = t 00750000
- 00760000
- If Datatype(fs.tube,'X') Then Do 00770000
- 00780000
- /*----------------------------------------------------------------*/00790000
- /* a dialed 3270 with pessimistic assumptions */00800000
- /*----------------------------------------------------------------*/00810000
- 00820000
- fs.scrrows = 24 00830000
- fs.scrcols = 80 00840000
- fs.write = '80'x 00850000
- flags = '00'x 00860000
- 00870000
- End /* If .. Do */ 00880000
- 00890000
- Else Do 00900000
- 00910000
- /*----------------------------------------------------------------*/00920000
- /* Get the screen size from CP. */00930000
- /*----------------------------------------------------------------*/00940000
- 00950000
- Parse Value Diag('8C') with flags +1 3 fs.scrcols +2 fs.scrrows +2 .00960000
- fs.scrrows = c2d(fs.scrrows) 00970000
- fs.scrcols = c2d(fs.scrcols) 00980000
- 00990000
- If fs.scrrows > 24 | fs.scrcols > 80 Then fs.write = 'C0'x 01000000
- Else fs.write = '80'x 01010000
- 01020000
- End /* Else Do */ 01030000
- 01040000
- fs.operwa = 'C0'x /* Erase/Write alternate */ 01050000
- fs.operw = '80'x /* Erase/Write */ 01060000
- fs.opwr = '00'x /* Write */ 01070000
- fs.oprd = '06'x /* Read modified. */ 01080000
- 01090000
- fs.wcc = '03'x /* Unlock keyboard, reset mdt */ 01100000
- 01110000
- fs.high = '1DE8'x /* Protected, highlighted. */ 01120000
- fs.low = '1D60'x /* Protected, normal. */ 01130000
- fs.ic = '13'x /* Insert cursor. */ 01140000
- 01150000
- fs.color = (bitand(flags,'80'x) = '80'x) 01160000
- fs.exthi = (bitand(flags,'40'x) = '40'x) 01170000
- fs.pss = (bitand(flags,'20'x) = '20'x) 01180000
- fs.7171 = (bitand(flags,'02'x) = '02'x) 01190000
- fs.14bit = (bitand(flags,'01'x) = '01'x) 01200000
- 01210000
- Return 01220000
- 01230000
- 01240000
- 01250000
- /* -------------------------------------------------------------- UNLOAD01260000
- * Unload Gopher EXECs, pipeline stages, messages to free-up memory. 01270000
- */ 01280000
- UNLOAD: 01290000
- 01300000
- 'PIPE COMMAND EXECMAP | LOCATE 1.3 /GOP/' , 01310000
- '| SPEC /EXECDROP / 1 1.20 NEXT | COMMAND' 01320000
- If rc ^= 0 Then Exit rc 01330000
- 01340000
- 'SET LANGUAGE (DELETE GOP USER' 01350000
- 01360000
- If rc ^= 0 Then Exit rc 01370000
- 01380000
- Exit 01390000
- 01400000
-